#!/usr/bin/perl
#
# TestuAPI.pl
#
use lib "../perl";
use uapi::Environment;
use uapi::io::File;


package main;
  &rootVerzeichnisAuslesen ();
  &wertEinerUmgebungsvariablen ();
  &namenAllerUmgebungsvariablen ();
1;

sub wertEinerUmgebungsvariablen () {
  my $env;
  $env = new uapi::Environment ();
  print ($env->getValue ("temp") . "\n\r");
  $env = undef;
}

sub namenAllerUmgebungsvariablen () {
  my $env;
  my @names;
  $env = new uapi::Environment ();
  @names = $env->getNames();
  foreach $name (@names) {
    print ("$name\n\r");
  }
  $env = undef;
}

sub rootVerzeichnisAuslesen () {
  my $root;
  my $file;
  $root = new uapi::io::File ("\\");
  my @files =$root->listFiles();
  foreach $file (@files) {
    print ($file->toString() . "\n\r");
  }
  $root = undef;
}